<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="css/shop.css">
    <title>我的购物车</title>
    <style>
        body{
            /*background: url("images/move.gif");*/
            /*background-size: 100% 100%;*/
        }
    </style>
</head>
<body>

<header>
    <div class="h-left"><span><a href="index.jsp" style="color: ghostwhite;">欢迎来到小叶子购物</a></span></div>
    <div class="h-right">
        <div class="move">0</div>
        <span class="active">&#10022;</span>

        <span class="guowu">购物车</span>
        <%--获取session--%>
        <% Object name= request.getSession().getAttribute("name");%>
        <% if(name==null){ %>

        <span onclick="show_login()" class="name">登录/注册</span>

        <%  }else{%>

        <span class="name"><%= name %></span>

        <% } %>

    </div>
</header>
<% if(name != null){ %>
<div class="close-login">
    <div class="item"><%=name%></div>
    <div class="item coa"><a href="">个人主页</a></div>
    <div class="item coa change">修改密码</div>
    <div class="item coa"><a href="close-log">退出登录</a></div>
</div>
<%  }%>
<%--登录注册弹出框--%>
<div class="box-y">
    <div class="head-y">
        <span class="cos cos-y">登录</span>
        <span class="cos">注册</span>
    </div>
    <div class="login con">
        <form action="login" method="post">
            <p>账户：<input type="text" name="name" value="小叶子"></p>
            <p>密码：<input type="password" name="password" value="123"></p>
            <p><button type="submit">登录</button></p>
        </form>
    </div>
    <div class="login">
        <form action="register" method="post">
            <p>账户：<input type="text" name="name"></p>
            <p>密码：<input type="password" name="password"></p>
            <p>邮箱：<input type="text" name="email"></p>
            <p><button type="submit">注册</button></p>
        </form>
    </div>
    <div class="del">
        <div></div>
        <div></div>
    </div>
</div>

<%--修改密码--%>
<div class="changepassword">
    <div class="chpa">
        <form action="changepass" method="post">
            <p>旧密码：<input type="password" name="oldpassword"></p>
            <p>新密码：<input type="password" name="newpassword"></p>
            <p>
                <span class="closechange">关闭</span>
                <button type="submit">确认</button>
            </p>
        </form>
    </div>
</div>

<div class="box">
    <div class="head">
        <div><span style="color: firebrick;" class="all1">全部商品</span><span class="col shopNumall">0</span></div>
        <div><span style="color: lightyellow;" class="all2">我的收藏夹</span></div>
        <div>
            <span>已选商品(不含运费)</span>
            <span class="col sum">0.00</span>
            <span>元</span>
            <span class="sub"><button>结算</button></span>
        </div>
    </div>
</div>

<div class="mia1">
    <div class="top">
        <div>商品信息</div>
        <div>商品类型</div>
        <div>商品数量</div>
        <div>商品单价</div>
        <div>操作</div>
    </div>

    <!--商品详情-->
    <div class="shuju" id="shopList">
        <% if(name==null){ %>
            <div class="block">请先登录，亲</div>
        <%  }else{%>
            <img class="load" src="images/loading.jpg">
        <% } %>
    </div>
</div>

<%--显示我的收藏夹--%>
<div class="mia2" id="myfavorites">

    <% if(name==null){ %>
    <div class="block">请先登录，亲</div>
    <%  }else{%>
        <span style="color: red;font-size: 18px;" class="emity">加载中。。。。。。</span>
    <% } %>

</div>

<!--点击结算-->
<footer>
    <div class="foot">
        <div class="f1"><label name="check1"><input type="checkbox" onclick="checkAll(this)" id="all"><span style="margin-left: 7px;" id="check1">全选</span></label></div>
        <div class="f2"><a href="javascript:void(0)" class="deleteAll">全部删除</a></div>
        <div class="f3"><a href="javascript:void(0)">移入收藏夹</a></div>
        <div class="f4">
            <div class="f4_f1"><span>已选商品</span><span class="col xuan">0</span><span>件</span><span class="up">&#9650;</span></div>
            <div class="f4_f2">
                <span>合计（不含运费）</span><span class="col sum">0.00</span><span>元</span><span><button>结算</button></span>
            </div>
        </div>
    </div>
</footer>

<!--返回顶部-->
<div class="back"  id="goToTop">
    <a href="javascript:void(0);"><img src="images/top.jpg" alt=""></a>
</div>

</body>
<script src="js/jquery.js"></script>
<script src="js/shop.js"></script>
</html>